<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Test Page</title>
    <style>
        .buttons {
            width: 80px;
            float: left;
            text-align: center;
            margin: 5px;
            border: 2px solid;
            font-weight: bold;
        }
        .hover {
            cursor: crosshair;
            color: blue;
            background-color: cyan;
        }
        .boldmatter {
            font-weight: bold;
        }
        .italicmatter {
            font-style: italic;
        }
    </style>
</head>
<body>
    <span class="buttons" id="boldbutton">Bold</span>
    <span class="buttons" id="italicbutton">Italic</span>
    <div id="info">
        Creating Rich Internet Applications<br>
        jQuery is an open source project<<br>
        Manipulating DOM using jQuery<br>
    </div>
    <script src="https://unpkg.com/jquery@3.2.1"></script>
    <script>

    $(document).ready(function() {
        $(".buttons").hover(
            function() {
                $(this).addClass('hover');
            },
            function() {
                $(this).removeClass('hover');
            }
        );

        $("#boldbutton").on("click", function() {
            $("#info").removeClass('italicmatter');
            $("#info").addClass('boldmatter');
        });

        $("#italicbutton").on('click', function() {
            $("#info").removeClass('boldmatter');
            $('#info').addClass('italicmatter');
        });
    });

    </script>
</body>
</html>